home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / comm / www / WWWworkbenchAW.lha / WWWworkbenchAW_2.1 / Install-WWWWorkbench < prev    next >
Encoding:
Text File  |  1998-10-06  |  3.8 KB  |  137 lines

  1. ; $VER: Install WWWW 0.1 (05.10.98)
  2. ; Installer script by WHMP
  3. ; Description: Installer script for WWWWorkbench ARexx script
  4.  
  5. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  6. (set awv 3)
  7. (set awr 1)
  8. (set #needInst43 "You must use Installer version 43 or greater.  Use the Installer program from your AWeb-II disk.")
  9. (if (< (/ @installer-version 65536) 43)
  10.   (abort #needInst43)
  11. )
  12.  
  13. (set #installing "Installing ")
  14. ; offer to back up a file or drawer
  15. (procedure bumprev #bumpfile #bumptxt
  16.   (if (exists #bumpfile)
  17.     (
  18.       (set bump 1)
  19.       (while (exists (cat #bumpfile "_old" bump) ) (set bump (+ bump 1)) )
  20.       (if
  21.         (askbool
  22.           (default 1)
  23.           (prompt (cat "\n\n\nBackup your current configuration directory \n " #bumpfile " as "
  24.               #bumpfile "_old" bump " ?\n\n\n "
  25.           #bumptxt ) )
  26.           (help
  27.             (cat "\n\n To add ways to launch WWWworkbench from AWeb \n your current saved configuration located in \n\"" #bumpfile "\" is about to be over written.\n"
  28.               "\nYou are being given the chance to back it up."
  29.               " Changes are minor, but if you are unsure select yes... just in case ;-D ."
  30.             )
  31.           )
  32.         )
  33.         ;        (rename #bumpfile (cat #bumpfile "_old" bump))
  34.         ( (set bdest (cat #bumpfile "_old" bump))
  35.           (copyfiles
  36.             (source #bumpfile)
  37.             (dest bdest)
  38.             (all)
  39.           )
  40.         )
  41.       )
  42.     )
  43.   )
  44. )
  45.  
  46. ;add a line to a settings file
  47.  
  48. (procedure addpref #preffile #preftext
  49.   (foreach "ENVARC:AWeb3" "~(program|browser|gui|network|window|settings)"
  50.     (
  51.       (if (= @each-type 2)
  52.         (run (cat "echo >>ENVARC:AWeb3/" @each-name "/" #preffile " \"" #preftext  "\"") )
  53.       )
  54.     )
  55.   )
  56.   (run (cat "echo >>ENVARC:AWeb3/" #preffile " \"" #preftext  "\"") )
  57. )
  58.  
  59. (set #no-aweb-ii
  60.   (cat "You must have completed the AWeb-II 3.1 installation before "
  61.     "you can install the %s plug-in. No AWeb3: assign has been found."
  62.   )
  63. )
  64. (if (not (exists "AWeb3:" (noreq)))
  65.   (abort (#no-aweb-ii @app-name))
  66. )
  67.  
  68. (set @default-dest "AWeb3:")
  69. (bumprev "envarc:aweb3"
  70.   (cat "(Your previously SAVED AWeb 3.1 configuration \n"
  71.   " will then be preserved in this backup directory.)")
  72. ) ; backup any previous AWeb3 prefs
  73.  
  74. (set menbut
  75.   (askoptions
  76.     (prompt
  77.       "\n\nInstall WWWworkbench as\n"
  78.           )
  79.     (help "\nThe GUI buttons appear on the main AWeb window"
  80. "\nThe ARexx menu is attached to the main AWeb window\n"
  81. "GUI buttons are only available with \n"
  82. "settings-GUI-options-show user buttons on\n")
  83.             (choices "A GUI Button"
  84.               "An ARexx Menu Entry"
  85.               ""
  86.               "A Keyboard Shortcut of \"<ALT>W\"" )
  87.     (default 3)
  88.   )
  89. )
  90. (if(bitand 1 menbut)
  91. (addpref "gui" "UBUT WWWWRUN AWebpath:Plugins/WWWworkbench/startWWWworkbench.awebrx")
  92. )
  93. (if(bitand 2 menbut)
  94. (addpref "gui" "AREX 0;AWebpath:plugins/WWWworkbench/startWWWworkbench.awebrx;STARTWWWworkbench")
  95. )
  96. ;(if(bitand 4 menbut)
  97. ;      (addpref "gui" "PUPI 3Image+RUN AWebpath:Plugins/WWWworkbench/startWWWworkbench.awebrx %u")
  98. ;)
  99. (if(bitand 8 menbut)
  100.      (addpref "gui" "UKEY 0357 run AWebpath:Plugins/WWWworkbench/startWWWworkbench.awebrx")
  101. )
  102. (copyfiles
  103.   (source "WWWWorkbench")
  104.   (all)
  105. (dest (tackon @default-dest "plugins/WWWworkbench"))
  106.   (prompt #installing "WWWworkbench")
  107. )
  108.  
  109.  
  110. (if (= @user-level 2)
  111.   ( bumprev "env:aweb3"
  112.     (cat "Your previous ACTIVE AWeb 3.1 configuration\n will then"
  113.     " be preserved in this backup directory.")
  114.   ) ;backup any active prefs
  115. )
  116.  
  117. (delete "env:aweb3/#?" (all))
  118.  
  119. (copyfiles
  120.   (source "ENVARC:AWeb3")
  121.   (dest "ENV:AWeb3")
  122.   (all)
  123. )
  124.  
  125.  
  126. (complete 100)
  127. (set @default-dest "AWeb3:plugins")
  128.  
  129.  
  130. (exit  "\n\n" @app-name
  131.   " is now installed.\n\n"
  132.   "If this is an update installation be sure to check your GUI "
  133. " settings for duplicate entries."
  134. "\n"
  135. )
  136.  
  137.